home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / cvs-960311 / lib / cvs / examples / unwrap < prev    next >
Encoding:
Text File  |  1996-01-19  |  465 b   |  22 lines

  1. #! /bin/sh
  2. #
  3. #    unwrap - extract the combined package (created with wrap)
  4. #
  5. #ident    "@(#)cvs/examples:$Name:  $:$Id: unwrap,v 1.1.1.1 1996/01/20 15:41:04 bbum Exp $"
  6.  
  7. # move the file to a new name with an extension
  8. rm -rf $1.cvswrap
  9. mv $1 $1.cvswrap
  10.  
  11. # untar the file
  12.  
  13. if `gzip -t $1.cvswrap > /dev/null 2>&1`
  14. then
  15.     gzcat -d $1.cvswrap | gnutar --preserve --sparse -x -f -
  16. else
  17.     gnutar --preserve --sparse -x -f $1.cvswrap
  18. fi
  19.  
  20. # remove the original
  21. rm -rf $1.cvswrap
  22.